<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
	<link rel="stylesheet" type="text/css" href="css/reset.css">
	<link rel="stylesheet" type="text/css" href="css/weui.min.css">
	<link rel="stylesheet" type="text/css" href="css/index.css">
	<title>嘉华金融</title>
</head>
<body>
	<div>
		<div class="header">
			<div><div class="back"></div></div>
			<div>银行卡</div>
			<div><div class="user-img"></div></div>
		</div>
		<div class="main">
			<div class="add-card-wrap">
				<div class="word">请绑定持卡人本人的银行卡</div>
				<div class="weui-cells weui-cells_form">
					<div class="weui-cell">
		                <div class="weui-cell__hd"><label class="weui-label">持卡人</label></div>
		                <div class="weui-cell__bd">
		                    <input class="weui-input card-username content" pl="姓名" >
		                </div>
		            </div>
		            <div class="weui-cell">
		                <div class="weui-cell__hd"><label class="weui-label">卡号</label></div>
		                <div class="weui-cell__bd">
		                    <input class="weui-input bank-number content" pl="请输入银行卡号">
		                </div>
		            </div>
		            <div class="weui-cell">
		                <div class="weui-cell__hd"><label class="weui-label">身份证号码</label></div>
		                <div class="weui-cell__bd">
		                    <input class="weui-input id-number content" pl="请输入身份证号">
		                </div>
		            </div>
		            <div class="weui-cell">
		                <div class="weui-cell__hd"><label class="weui-label">卡类型</label></div>
		                <div class="weui-cell__bd">
		                    <input class="weui-input bank-number" value="银行卡类型" readonly>
		                </div>
		            </div>
				</div>
				 <div class="agree">
					<label for="weuiAgree" class="weui-agree">
			            <input id="weuiAgree" type="checkbox" class="weui-agree__checkbox">
			            <span class="weui-agree__text">
			                阅读并同意<a href="javascript:void(0);">《相关条款》</a>
			            </span>
			        </label>
				</div>
				<div class="error-content loan-error"></div>
				<div class="next-btn h-btn add-card-btn"><a>下一步</a></div>
			</div>		
		</div>	
	</div>
	<script src="js/jquery-3.2.1.min.js"></script>
	<script src="js/index.js"></script>
	<script>
		$('input').keyup(function(){
			var fz = 0;
			$('input').each(function(){
				if($(this).val()=="" || $(this).val() == $(this).attr("pl") ){
					$(".h-btn").removeClass("active")
					return;
				}
				fz++;
			})
			if(fz == $('input').length && $(".weui-agree__checkbox").is(":checked")){
				$(".h-btn").addClass("active")
			}
		})
		$("#weuiAgree").click(function() {
			if($(".weui-agree__checkbox").is(":checked")) {
				$('.content').each(function() {
					if($(this).val() == "" || $(this).val() == $(this).attr("pl") ){
						$(".h-btn").removeClass("active")
						return;
					}else {
						$(".h-btn").addClass("active")
					}
				})
			}else {
				$(".h-btn").removeClass("active")
			}
		})
	</script>
</body>
</html>